/**
 * Created by fanfan on 2016/6/14.
 */
$(document).ready(function(){
    var admin =getUrlParam('isAdmin');
    
    /*device.checkApi({
        list : ['shareDevice'],
        onSuccess : function (ret) {
            var canuse=JSON.stringify(ret).shareDevice;
            if(canuse && admin && admin==1){
                $('#takePIC').hide();
            }else {
                $('#shareTD').hide();
            }
            //device.log(JSON.stringify(ret));
            //alert(JSON.stringify(ret))
        }
    });*/

    if(admin && admin==1)
    {
		$('#takePIC').hide();
    }
    else
    {
        $('#shareTD').hide();
    }
});

function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
    var r = window.location.search.substr(1).match(reg);  //匹配目标参数
    if (r != null) return unescape(r[2]); return null; //返回参数值
}
